package com.ashlikun.zxing.analyze

import com.ashlikun.zxing.DecodeConfig
import com.ashlikun.zxing.DecodeFormatManager
import com.google.zxing.DecodeHintType
import com.google.zxing.Reader
import com.google.zxing.multi.MultipleBarcodeReader
import com.google.zxing.multi.qrcode.QRCodeMultiReader
import com.google.zxing.qrcode.QRCodeReader

/**
 * 二维码分析器
 */
class QRCodeAnalyzer @JvmOverloads constructor(config: DecodeConfig = DecodeConfig().also { it.hints = DecodeFormatManager.QR_CODE_HINTS.toMutableMap() }) : BarcodeFormatAnalyzer(config) {

    override fun createReader(): Reader? {
        return QRCodeReader()
    }

    override fun createMultipleBarcodeReader(reader: Reader?): MultipleBarcodeReader? {
        return QRCodeMultiReader()
    }
}